02. Getting Started

Getting Started

Instructions

  1. Follow the Udacity instructions to launch an EC2 GPU instance . All of the remaining instructions should be executed in the EC2 instance.

  2. Clone the project GitHub repository, and navigate to the downloaded folder:

git clone https://github.com/udacity/AIND-CV-FacialKeypoints.git
cd AIND-CV-FacialKeypoints
  1. All of the data you'll need to train a neural network is in the AIND-CV-FacialKeypoints repo, in the subdirectory data. In this folder are a zipped training and test set of data. Unzipping these files should produce two .csv files of the same name.
cd data
unzip training.zip
unzip test.zip
cd ..
  1. Start Jupyter: jupyter notebook --ip=0.0.0.0 --no-browser

  2. Look at the output in the window, and find the line that looks like the following:

Copy/paste this URL into your browser when you connect for the first time to login with a token: 
http://0.0.0.0:8888/?token=3156e...
  1. Copy and paste the complete URL into the address bar of a web browser (Firefox, Safari, Chrome, etc). Before navigating to the URL, replace 0.0.0.0 in the URL with the "IPv4 Public IP" address from the EC2 Dashboard. Press Enter.

  2. Click on CV_project.ipynb. Follow the instructions in the notebook.

(Optional) Instructions for Completing the Project on Your Local Machine

All of the starting code and resources you'll need to compete this project are in a Github repo! Before you can get stared coding, you'll have to make sure that you have all the libraries and dependencies required to support this project.

  1. Clone the repository, and navigate to the downloaded folder.
git clone https://github.com/udacity/AIND-CV-FacialKeypoints.git
cd AIND-CV-FacialKeypoints
  1. Create (and activate) a new environment with Python 3.5 and the numpy package.

    • Linux or Mac:
    conda create --name aind-cv python=3.5 numpy
    source activate aind-cv
    • Windows:
    conda create --name aind-cv python=3.5 numpy scipy
    activate aind-cv
  2. Install/Update TensorFlow (for this project you may use CPU only).

    • Option 1: To install TensorFlow with GPU support, follow the guide to install the necessary NVIDIA software on your system. If you are using the Udacity AMI, you can skip this step and only need to install the tensorflow-gpu package:
    pip install tensorflow-gpu -U
    • Option 2: To install TensorFlow with CPU support only:
    pip install tensorflow -U
  3. Install/Update Keras.

pip install keras -U
  1. Switch Keras backend to TensorFlow.

    • Linux or Mac:
    KERAS_BACKEND=tensorflow python -c "from keras import backend"
    • Windows:
    set KERAS_BACKEND=tensorflow
    python -c "from keras import backend"
  2. Install a few required pip packages (including OpenCV).

pip install -r requirements.txt

Data

All of the data you'll need to train a neural network is in the AIND-CV-FacialKeypoints repo, in the subdirectory data. In this folder are a zipped training and test set of data.

  1. Navigate to the data directory
cd data
  1. Unzip the training and test data (in that same location). If you are in Windows, you can download this data and unzip it by double-clicking the zipped files. In Mac, you can use the terminal commands below.
unzip training.zip
unzip test.zip

You should be left with two .csv files of the same name. You may delete the zipped files.

Troubleshooting

If you are having trouble unzipping this data, you can download that same training and test data on Kaggle.

Now, with that data unzipped, you should have everything you need!

Notebook

  1. Navigate back to the repo. (Also your source environment should still be activated at this point)
cd
cd AIND-CV-FacialKeypoints
  1. Open the notebook and follow the instructions.
jupyter notebook CV_project.ipynb

NOTE: While some code has already been implemented to get you started, you will need to implement additional functionality to successfully answer all of the questions included in the notebook. Unless requested, do not modify code that has already been included.